const Router = require("koa-router");
const authRouter = new Router();

// verifyLogin:验证用户是否存在，密码是否正确
const { verifyLogin, verifyAuth } = require("../middleware/auth.middleware");

const { login, success } = require("../controller/auth.controller");

authRouter.post("/login", verifyLogin, login);
// 做个测试   verifyAuth验证授权  授权了就进入success
authRouter.get("/test", verifyAuth, success);

module.exports = authRouter;
